<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <link href="static/bootstrap-3.4.1-dist/css/bootstrap.min.css" rel="stylesheet">
  <script src="static/bootstrap-3.4.1-dist/js/bootstrap.min.js"></script>
  <script src="static/js/jquery.min.js"></script>
  <title>登录页面</title>
</head>
<body>
ajax--demo
</body>
</html>
<script>
  /* 定义一个对象 */
  var person={
    'name':'张小明',
    'age':20,
    'foods':['苹果','香蕉','橘子','葡萄'],
    'pets':[
      {
        'petName':'大黄',
        'petType':'dog'
      },
    ]
  }
  /* 获取对象属性值 */
  console.log(person.name)
  console.log(person.foods[0])
  console.log(person.pets[0].petName)
  /* 将对象转换成JSON字符串 */
  var personStr =JSON.stringify(person)
  console.log(personStr)
  /* 将JSON字符串转换成对象 */
  var person1 =JSON.parse(personStr);
  console.log(person1)
</script>